package WhatGUI;

import java.awt.*;
import java.io.IOException;

public class WhatPic extends Frame {
	
	private WhatDialog wd = new WhatDialog(this, "終了");
	
	public WhatPic() throws IOException {
		addWindowListener(new WhatAdapter(wd));
		setTitle("pictest");
		setSize(800, 600);
		WhatLabel label = new WhatLabel("001.jpg");
		ScrollPane pane = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
		pane.setSize(200, 200);
		Adjustable vadjust = pane.getVAdjustable();
		Adjustable hadjust = pane.getHAdjustable();
		hadjust.setUnitIncrement(10);
		vadjust.setUnitIncrement(10);
		pane.setWheelScrollingEnabled(true);
		pane.add(label);
		add(pane);
		setLocationRelativeTo(null);
		setVisible(true);
		label.setSize();
		System.out.println(label.getSize());
	}
	
	public static void main(String[] args) throws IOException {
		new WhatPic();
	}
}
